package com.sfd.ThreadedBinaryTree;

import com.sfd.ThreadedBinaryTree.TBTree.TBTNode;


public class Test {

	public static void main(String[] args) {
		TBTree tree=new TBTree('A');
		
		tree.appendLNode('A', 'B');
		tree.appendRNode('A', 'C');
		tree.appendLNode('B', 'D');
		tree.appendRNode('B', 'E');
//		System.out.println("=========================");
		tree.appendLNode('C', 'F');
		tree.appendRNode('C', 'G');
		tree.appendLNode('D', 'H');
		tree.appendRNode('H', 'K');
		tree.appendLNode('F', 'I');
		tree.appendRNode('G', 'J');

//		tree.preOrderTraverse(tree.getRoot());
//		System.out.println();
//		tree.inOrderTraverse(tree.getRoot());
//		System.out.println();
//		tree.afterOrderTraverse(tree.getRoot());
		
		tree.inThreading(tree.getRoot());
		TBTNode head=tree.addHead();
		tree.inOrderTraverse_Thr(head);
		
		
		
	}
	
}
